package com.neusoft.work.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.neusoft.work.po.CareLevelProject;
import com.neusoft.work.po.CareProject;
import com.neusoft.work.po.PageResponseBean;
import com.neusoft.work.po.ResponseBean;
import com.neusoft.work.service.CareLevelProjectService;


@RequestMapping("/CareLevelProjectController")
@RestController
public class CareLevelProjectController {
	
	@Autowired
	private CareLevelProjectService clps;
	
	@RequestMapping("/getProjectsByLevel")
	public PageResponseBean<List<CareProject>> getProjectsByLevel(Integer careLevelId) {
		return clps.getProjectsByLevel(careLevelId);
	}
	
	@RequestMapping("/addCareLevelProject")
	public ResponseBean<Integer> addCareLevelProject(CareLevelProject clp){
		return clps.addCareLevelProject(clp);
	}
	
	@RequestMapping("/deleteCareLevelProject")
	public ResponseBean<Integer> deleteCareLevelProject(Integer careLevelId,Integer careProjectId){
		return clps.deleteCareLevelProject(careLevelId, careProjectId);
	}
}
